﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTOSingTowerMall;
using BLSingTowerMall;

namespace FacadeSingTowerMall
{
    public class PromotionBookingFacade
    {
        public bool fBookPromotion(int store_Id
                                       , string startDate, string endDate
                                       , string promoTitle, string promoDesc
                                       , string imgPath)
        {
            PromotionBookingProcess promoBkProcess = new PromotionBookingProcess();
            ICampaign newBooking = new Campaign();


            newBooking.BlockID = promoBkProcess.getBlockIdbyStoreId(store_Id); 
            newBooking.StartPeriod = Convert.ToDateTime( startDate);
            newBooking.EndPeriod = Convert.ToDateTime( endDate);
            newBooking.Title = promoTitle;
            newBooking.Description = promoDesc;

            newBooking.ImagePath = imgPath;


            
            promoBkProcess.bookPromotion(newBooking);
            return true;
        }
    }
}
